﻿namespace PlaxoSyncWM {
    public static class Url {

        public static string For(Contact contact) {
            return For(contact.ItemId, contact.FirstName, contact.LastName, contact.MobileNumber);
        }

        public static string For(string itemId, string firstName, string lastName, string mobileNumber) {
            string urlForContact =
                    string.Format(
                        @"['Add', 'Type', 'Contact', 'ItemID', '{0}'], ['Data', 'AIMScreenName','', 'Birthday', '','BusinessEmail', '','BusinessIM', '','BusinessMicroBlog', '','BusinessMobilePhone', '', 'Category', '','Company', '', 'DisplayName', '{1} {2}', 'FamilyName', '{2}','FirstName', '{1}','HomeAddress', '', 'HomeCity', '','HomeCountry', '','HomeFax', '','HomePhone', '', 'HomeState', '','HomeZipCode', '','JobTitle', '','LastName', '{2}', 'MiddleName', '','NameSuffix', '','NameTitle', '','NickName', '','Notes', '', 'PersonalEmail', '', 'PersonalIM', '','PersonalMicroBlog', '','PersonalMobilePhone', '{3}', 'PersonalPhoto', '','PersonalWebPage', '', 'PreferredAddress', '', 'WorkAddress', '', 'WorkCity', '','WorkCountry', '','WorkFax', '', 'WorkPager', '','WorkPhone', '', 'WorkState', '','WorkZipCode', '']%0a",
                        itemId, firstName, lastName, mobileNumber);

            return urlForContact;
        }
    }
}